package com.dataextend.service.impl;

import com.dataextend.mapper.cluster.UserRoleDao;
import com.dataextend.entity.UserRoleEntity;
import com.dataextend.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleDao userRoleDao;

    @Override
    public int add(UserRoleEntity userRoleEntity) {
        return userRoleDao.add(userRoleEntity);
    }

    @Override
    public int update(UserRoleEntity userRoleEntity) {
        return userRoleDao.update(userRoleEntity);
    }

    @Override
    public void delete(Long id) {
        userRoleDao.delete(id);
    }

    @Override
    public UserRoleEntity queryById(Long id) {
        return userRoleDao.queryById(id);
    }

    @Override
    public List<UserRoleEntity> list(UserRoleEntity userRoleEntity) {
        return userRoleDao.list(userRoleEntity);
    }
}
